<?php
/**
 * Description of Uri
 *
 * @author dan
 */
class Uri {
    
    private $segments;
    
    /**
     * set the uri segments
     * 
     * @param array $array 
     */
    public function setSegments($array){
        $this->segments = $array;
    }
    
    /**
     * Get a URI segment by number, or false if there isn't one
     * 
     * @param type $index
     * @return boolean 
     */
    public function getSegment($index){
        if(!empty($this->segments[$index])){
            return $this->segments[$index];
        }
        return false;
    }
}